var gdl = gdl || {};
gdl.d2 = {};

gdl.d2.hotspot2X = function(pX, pY){
	builder.clear();
	builder.buildLine("hotspot2 {0}, {1}, UNid, {0}, 2 : UNid=UNid+1", pX, pY);
	builder.buildLine("hotspot2 0, {1}, UNid, {0}, 1 + 128 : UNid=UNid+1", pX, pY);
	builder.buildLine("hotspot2 -1, {1}, UNid, {0}, 3 : UNid=UNid+1", pX, pY);
	var t = builder.toString();
	builder.clear();
	return t;
};
functionManager.register("gdl.d2.hotspot2X",
 "Creates hotspot2d moving parallel to the X axis from point p coordinates.",
 ["pX", "pY"]);

 gdl.d2.hotspot2Y = function(pX, pY){
	builder.clear();
	builder.buildLine("hotspot2 {0}, {1}, UNid, {1}, 2 : UNid=UNid+1", pX, pY);
	builder.buildLine("hotspot2 {0}, 0, UNid, {1}, 1 + 128 : UNid=UNid+1", pX, pY);
	builder.buildLine("hotspot2 {0}, -1, UNid, {1}, 3 : UNid=UNid+1", pX, pY);
	var t = builder.toString();
	builder.clear();
	return t;
};
functionManager.register("gdl.d2.hotspot2Y",
 "Creates hotspot2d moving parallel to the Y axis from point p coordinates.",
 ["pX", "pY"]);